A contextual menu is a menu in a graphical user interface that appears upon user interaction, such as a touch, right-click mouse operation, or other types of user input made with respect to an object. Contextual menus offer a set of controls that may vary based on the context surrounding the object.
For example, selecting a word that has been flagged as misspelled may result in a proofing menu with suggestions for correcting the misspelled word. Selecting an un-flagged word may result in an edit menu being displayed that includes various controls for editing the content in general, such as cut, copy, and paste controls.
Some contextual menus may adhere to a menu hierarchy, in that one menu may be considered a parent with respect to one or more child menus. This may be the case when, for instance, one menu is used more widely or under basic circumstances, while another menu is surfaced in response to a particular context. In the example above, the edit menu may be considered a parent of the proofing menu, as well as the parent of other menus such as a hyperlink menu, a formatting menu, and the like.
Navigating between parent and children menus can be a sub-optimal experience in many scenarios. In an example where a proofing menu has been surfaced in association with a misspelled word, navigating to its parent menu typically requires the user to cancel out of the child menu (usually by touching elsewhere in the user interface). The user must then re-select the word. But this only surfaces the parent menu if the word has been corrected. If it remains in a misspelled state, the child menu will surface again.
Such problems are alleviated in some scenarios by surfacing two contextual menus at once. But this solution can cause other problems, such as content and menu occlusions, especially on small form-factor devices. In addition, showing a main menu and submenu at the same time adds to the complexity of the user experience. While the main menu could be closed by the user, allowing the user to view just the sub-menu, returning to the main menu is still burdensome.
The limited screen real-estate that is available on small-form factor devices introduces other problems with respect to contextual menus. In one problem, relatively long contextual menus with many controls can be difficult to fit in the vertical direction, especially when a soft keyboard is present.